package 字符类型;

import java.util.Scanner;

public class 字符串大小写转换 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String str = scanner.next();
        char[] chars = str.toCharArray();
        for (int i = 0; i < chars.length; i++) {
            if (chars[i]>='a'&&chars[i]<='z'){
                chars[i] = (char) (chars[i]-32);
            }else if (chars[i]>='A'&&chars[i]<='Z'){
                chars[i] = (char) (chars[i]+32);
            }else {
                continue;
            }
        }
        System.out.println(chars);
    }
}
